package com.example.demo.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.example.demo.bean.Article;

//这是一个dao层的类
public interface ArticleDao {

	//插入一个用户
	@Insert("insert INTO cms_article(title ,STATUS)  VALUES(#{title},#{status})")
	void insertArticle(String title,String status);
	
	//删除一个用户
	@Delete("DELETE FROM cms_article WHERE title=#{title} ")
	void deleteArticleByTitle(String title);
	
	
	//更新一个用户
	@Update("update cms_article set status=#{status} where title=#{title}")
	void updateArticle(String status,String title);
	
	
	//查询所有用户
	@Select("select * from cms_article")
	List<Article> selectAll();
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
}
